package com.lg.algorithm.collections.tree;

import com.lg.algorithm.collections.tree.TreeFun;
import com.lg.algorithm.collections.tree.TreeNode;

public class Main {

    public static void main(String[] args) {
        TreeNode treeNode = TreeFun.createTree();
        TreeFun.prePrint(treeNode);
        System.out.println();
        TreeFun.inPrint(treeNode);
        System.out.println();
        TreeFun.postPrint(treeNode);
        System.out.println();
        System.out.println("---------根据前序中序，创建一个二叉查找树---------");
//        abdegcf
//        dbgeacf
        TreeNode newTree = TreeFun.createTreeByPreOrderAndInOrder("abdegcf", "dbgeacf");
        TreeFun.postPrint(newTree);
        System.out.println();

    }
}
